<?php
require_once('../config.php');
require_once(ROOT.'includes/db.php');
require_once(ROOT.'includes/user.php');
$user_id= $_GET['uid'];
header("Content-Type: text/html; charset=UTF-8");

$user_row = DB::queryFirstRow("SELECT * FROM `account` WHERE `id`=%i", $user_id);

sendActivationEmail($user_id,$user_row['activation_key'], $user_row['email']) or die('激活邮件发送失败，请重试');

js_redirect('激活邮件已发送，正在返回首页', HOME_URL);
?>